package test7;

import java.util.Scanner;

public class main201621123021 {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            Stack stack = new Stack();
            boolean flag = true;
            String str = sc.next();
            char[] ch = str.toCharArray();
            for(char e:ch){
                stack.push(e);
            }
            for(int i=0;i<stack.size();i++){
                if(ch[i]!=stack.peek()){
                    flag=false;
                    break;
                }
                stack.pop();
            }
            System.out.println(flag);

            sc.close();


        }

    }

